package com.atguigu.ioc_05;

import org.springframework.beans.factory.FactoryBean;

/**
 * @Package com.atguigu.ioc_05
 * @Program: ssm-spring-part
 * @ClassName JavaBeanFactoryBean
 * @Description[类型描述] JavaBean类的FactoryBean接口实现类
 * @Author: 霍杰
 * @CreateTime 2024/9/25
 * @Version 1.0
 * @Update [序号][ 日期YYYY-MM-DD][更改人姓名][变更描述]
 **/
public class JavaBeanFactoryBean implements FactoryBean<JavaBean> {

    @Override
    public JavaBean getObject() throws Exception {
        //使用自己的方法实例化对象就可以了
        JavaBean javaBean = new JavaBean();
        return javaBean ;
    }

    @Override
    public Class<?> getObjectType() {
        return JavaBean.class;
    }

    @Override
    public boolean isSingleton() {
        return FactoryBean.super.isSingleton();
    }
}
